package com.pig.pojo.commgoods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 商品实体类
 */
@TableName("p_goods")
public class Goods implements Serializable {
    private static final long serialVersionUID = 407462409056231952L;
    /**
     * 商品id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 商品名称
     */
    private String title;
    /**
     * 商品描述
     */
    private String des;
    /**
     * 商品价格
     */
    private Double price;
    /**
     * 商品毛重
     */
    private Double weight;
    /**
     * 商品产地
     */
    private String origin;
    /**
     * 商品存量
     */
    private Integer num;
    /**
     * 商品种类
     */
    private String variety;
    /**
     * 图片路径
     */
    private String img;
    /**
     * 商品目录id
     */
    private Integer categoryId;
    /**
     * 商品状态,默认为1启用，0禁用
     */
    private Integer status = 1;
    /**
     * 商品保质期
     */
    private Integer storage;
    /**
     * 储存条件
     */
    private String storageFactor;
    /**
     * 商品更新时间
     */
    private Date updateTime;

    private Date createdTime;
    public Goods() {

    }

    public Goods(Date createdTime, Integer id, String title, String des, Double price, Double weight, String origin, Integer num, String variety, String img, Integer categoryId, Integer status, Integer storage, String storageFactor, Date updateTime) {
        this.createdTime = createdTime;
        this.id = id;
        this.title = title;
        this.des = des;
        this.price = price;
        this.weight = weight;
        this.origin = origin;
        this.num = num;
        this.variety = variety;
        this.img = img;
        this.categoryId = categoryId;
        this.status = status;
        this.storage = storage;
        this.storageFactor = storageFactor;
        this.updateTime = updateTime;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStorage() {
        return storage;
    }

    public void setStorage(Integer storage) {
        this.storage = storage;
    }

    public String getStorageFactor() {
        return storageFactor;
    }

    public void setStorageFactor(String storageFactor) {
        this.storageFactor = storageFactor;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", des='" + des + '\'' +
                ", price=" + price +
                ", weight=" + weight +
                ", origin='" + origin + '\'' +
                ", num=" + num +
                ", variety='" + variety + '\'' +
                ", img='" + img + '\'' +
                ", categoryId=" + categoryId +
                ", status=" + status +
                ", storage=" + storage +
                ", storageFactor='" + storageFactor + '\'' +
                ", updateTime=" + updateTime +
                ", createdTime=" + createdTime +
                '}';
    }
}
